<%@ page contentType="text/html;charset=UTF-8" %>
<div style="height:100%;width:100%;padding-top:3px">
	<div style="float:left;padding-top:2px;padding-left:3px;">
		<span><a name=1" style="cursor: hand" onclick="openTreeAtLevel(1);" stopAll(event)>1</a></span>
		<span><a name=2" style="cursor: hand" onclick="openTreeAtLevel(2);" stopAll(event)>2</a></span>
		<span><a name=3" style="cursor: hand" onclick="openTreeAtLevel(3);" stopAll(event)>3</a></span>
		<span><a name=4" style="cursor: hand" onclick="openTreeAtLevel(4);" stopAll(event)>4</a></span>
		<span><a name=5" style="cursor: hand" onclick="openTreeAtLevel(5);" stopAll(event)>5</a></span>
		<span><a name=6" style="cursor: hand" onclick="openTreeAtLevel(6);" stopAll(event)>6</a></span>
		<span><a name=e" style="cursor: hand" onclick="openTreeAtLevel('E');" stopAll(event)>E</a></span>
	</div>
</div>

<script>
	/*打开哪一级的树*/
	window.currentlevel = -1;
	function openTreeAtLevel(openLevel){
		var treeComp = getComponent('reftree');
		if(window.currentlevel != -1 && openLevel != window.currentlevel){
			treeComp.openNodesByLevel(window.currentlevel);
		}
		treeComp.openNodesByLevel(openLevel);
		window.currentlevel = openLevel; 
	}
</script>